#!/usr/bin/python
# -*- coding: UTF-8 -*-

import random
import string

lowercase = string.ascii_lowercase
uppercase = string.ascii_uppercase
digits = string.digits
symbols = '!@#$%^&*()_+-=[]{}|;:,.<>?/'

al_chars = lowercase + uppercase + digits + symbols


def gen(length=16):
    password = [
        random.choice(lowercase),
        random.choice(uppercase),
        random.choice(digits),
        random.choice(symbols),
    ] + random.choices(al_chars, k=length-4)

    random.shuffle(password)
    return ''.join(password)

